import { Radio } from 'antd'

const RadioEntry = (props) => {
  const { onChange, ...opt } = props
  const { options = [] } = opt
  return (
    <Radio.Group
      {...opt}
      size="small"
      onChange={(e) => onChange(e.target.value)}
      className="bi-radio"
      style={{ gridTemplateColumns: `repeat(${options.length}, 1fr)` }}
    />
  )
}

export default RadioEntry
